import { Body, Controller, Post } from '@nestjs/common'
import { FixService } from './fix.service'

@Controller('fix')
export class FixController {
  constructor(private readonly fixService: FixService) { }

  @Post('add')
  add(@Body() body) {
    return this.fixService.add(body)
  }

  @Post('del')
  del(@Body() body) {
    return this.fixService.del(body.id as number)
  }

  @Post('edit')
  edit(@Body() body) {
    return this.fixService.update(body)
  }

  @Post('page')
  page(@Body() body) {
    return this.fixService.getPageList(body)
  }

  @Post('getFixDetail')
  getFixDetail(@Body() body) {
    return this.fixService.getFixDetail(body.code)
  }
}
